package com.ly.share.loc;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;

/**
 * @author icanci
 * @since 1.0 Created in 2022/06/18 09:27
 */
@Mojo(name = "loc", defaultPhase = LifecyclePhase.COMPILE, threadSafe = true)
public class LocMojo extends AbstractMojo {

    /**
     * 当前模块对象
     */
    @Parameter(defaultValue = "${project}", readonly = true)
    private MavenProject project;

    /**
     * 环境
     */
    @Parameter(property = "cfg.env")
    private String       env;

    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        System.out.println(env);
    }
}
